
namespace Sedna.Core.Common
{
	/// <summary>
	/// This Enum defines the target (or source) scope or 'place' 
	/// where a specified value should be stored/retrieved from
	/// 
	/// All scopes are case insensitive when used from 
	/// Spring context configurations and for the Data Binding
	/// </summary>
	public enum Scope
	{
		/// <summary>
		/// equivalent of HttpContext.Items["key"]
		/// </summary>
		Request,

		/// <summary>
		/// context that is local to a single page
		/// </summary>
		Page,

		/// <summary>
		/// context that is local to a client HTTP Session
		/// </summary>
		Session,
 
		/// <summary>
		/// context that is equal to HttpContext.Application["key"]
		/// </summary>
		Application,

		/// <summary>
		/// context that is local to a particula HTTP cookie (a short-cut for getting or setting cookies)
		/// </summary>
		Cookie,

		/// <summary>
		/// scope that is mapped directly to the underlying IoC (Dependency Injection Container) implementation
		/// e.g. to the Springframework.NET
		/// Using this context scope effectively means redirecting a call to SpringContextFactory.GetContext().GetObject("key")
		/// It is obvious that it is not possible to set any objects INTO an underlying context
		/// (although this might be changed in future implementations)
		/// </summary>
		IoCContainer, 

		/// <summary>
		/// a rough equivalent to the Page scope, although instead of using any underlying HttpContext
		/// implementations, this scope uses an IDictionary that is created and maintained for each separate HTTP request
		/// </summary>
		ExecutionContext,

		/// <summary>
		/// short alias for ExecutionContext
		/// </summary>
		EC,

		/// <summary>
		/// scope that isolates data related to the current control. may be useful in situations when action should 
		/// provide data for its control only (e.g. data load action that loads data for dropdownlist )
		/// </summary>
		Current,

		/// <summary>
		/// scope that is local for a set of logically defined pages
		/// (e.g. a typical workflow includes navigation through pages for creation and population of an Order
		/// as soon as a User left this set of pages, i.e. navigates to some other page that is not in that predefined set
		/// the Workflow state is abandoned)
		/// A Workflow set is defined by a Workflow ID (BasePage.WorkflowId). All pages that have the same 
		/// WorkflowId are considered to be within the same Workflow, thus share the same Workflow state per user http session
		/// Please note, that a Workflow state is NOT shared among several user HTTP sessions (basically it 
		/// cannot do so as it uses the underlying HTTP session, which is unique 
		/// for every browser connection, i.e a User, per se)
		/// </summary>
		Workflow,
	
	    /// <summary>
	    /// 
	    /// </summary>
	    Call
	};
}
